package mock

import (
	"encoding/json"
	"github.com/edgexfoundry/edgex-go/internal/app/dtos"
	"github.com/edgexfoundry/edgex-go/internal/app/models"
	"github.com/edgexfoundry/edgex-go/internal/pkg/utils"
)

var jsonProfile = `
{
	"dbtimestamp": {
		"created": 0,
		"modified": 0
	},
	"name": "",
	"manufacturer": "inspur",
	"description": "",
	"model": "model",
	"labels": [],
	"deviceResources": [],
	"deviceCommands":[]
}`

func GetMockDeviceProfile() (d models.DeviceProfile, err error) {
	var dp dtos.DeviceProfile
	ts := utils.MakeTimestamp()
	dp.Created = ts
	dp.Modified = ts
	err = json.Unmarshal([]byte(jsonProfile), &dp)
	d = dp.ToDeviceProfileModel()
	return
}
